package org.szrcb.temu.SalesManage.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.szrcb.temu.SalesManage.DTO.AfterSalesDTO;
import org.szrcb.temu.SalesManage.pojo.MallInfo;
import org.szrcb.temu.SalesManage.dao.MallInfoDao;
import org.szrcb.temu.SalesManage.service.MallInfoService;

import java.util.List;

@Service
public class MallInfoServiceImpl implements MallInfoService {
    @Autowired
    private MallInfoDao mallInfoDao;

    @Override
    public int countMallInfoById(String mallId) {
        return mallInfoDao.countMallInfoById(mallId);
    }

    @Override
    public void updateMallInfo(MallInfo mallInfo) {
        mallInfoDao.updateMallInfo(mallInfo);
    }

    @Override
    public void insertMallInfo(MallInfo mallInfo) {
        mallInfoDao.insertMallInfo(mallInfo);
    }

    @Override
    public void updateUserMallRel(String userId, String mallId) {
        mallInfoDao.insertUserMallRel(userId,mallId);
    }

    @Override
    public List<MallInfo> queryMallList(String userId) {
        return mallInfoDao.queryMallList(userId);
    }

    @Override
    public void deleteUserMallRel(String userId) {
        mallInfoDao.deleteUserMallRel(userId);
    }

    @Override
    public List<MallInfo> queryUserMallList(String userId) {
        return mallInfoDao.queryUserMallList(userId);
    }

    @Override
    public void updateVipState(List<String> mallIdList) {
        mallInfoDao.updateVipState(mallIdList);
    }

}
